home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / TownHouse.script < prev    next >
Text File  |  2001-10-08  |  2KB  |  106 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CTownHouseMesh_1
  11. {
  12.   string MeshFile = "Models/B_Town_1.mesh";
  13.   string SkinFile = "Models/B_Town_1.skin";
  14. }
  15.  
  16. class CTownHouseMesh_2
  17. {
  18.   string MeshFile = "Models/B_Town_1.mesh";
  19.   string SkinFile = "Models/B_Town_1.skin";
  20. }
  21.  
  22. class CTownHouseMesh_3
  23. {
  24.   string MeshFile = "Models/B_Town_1.mesh";
  25.   string SkinFile = "Models/B_Town_1.skin";
  26. }
  27.  
  28. class CTownHouseMesh_4
  29. {
  30.   string MeshFile = "Models/B_Town_4.mesh";
  31.   string SkinFile = "Models/B_Town_4.skin";
  32. }
  33.  
  34. class CTownHouseMesh_5
  35. {
  36.   string MeshFile = "Models/B_Town_5.mesh";
  37.   string SkinFile = "Models/B_Town_5.skin";
  38. }
  39.  
  40. class CTownHouseMesh_6
  41. {
  42.   string MeshFile = "Models/B_Town_5.mesh";
  43.   string SkinFile = "Models/B_Town_5.skin";
  44. }
  45.  
  46. class CTownHouseMesh_7
  47. {
  48.   string MeshFile = "Models/B_Town_5.mesh";
  49.   string SkinFile = "Models/B_Town_5.skin";
  50. }
  51.  
  52. class CTownHouseMesh_8
  53. {
  54.   string MeshFile = "Models/B_Town_4.mesh";
  55.   string SkinFile = "Models/B_Town_4.skin";
  56. }
  57.  
  58. class CTownHouseMesh_9
  59. {
  60.   string MeshFile = "Models/B_House_l.mesh";
  61.   string SkinFile = "Models/B_House_l.skin";
  62. }
  63.  
  64. class CTownHouseStateControl extends CUnitLifeControl
  65. {
  66.   void CTownHouseStateControl()
  67.   {
  68.     CUnitLifeControl(5000.0);
  69.     m_DestroyPause = 20.0;
  70.     m_ExplosionId  = "EXPLID_BuildingExplosion";
  71.   }
  72. }
  73.  
  74. // Building without ground control (for use in villages)
  75. class CBaseTownHouse extends CBuilding, CUnitWithStateControl
  76. {
  77.   array m_MeshClassNames = array(
  78.       "CTownHouseMesh_1",
  79.       "CTownHouseMesh_2",
  80.       "CTownHouseMesh_3",
  81.       "CTownHouseMesh_4",
  82.       "CTownHouseMesh_5",
  83.       "CTownHouseMesh_6",
  84.       "CTownHouseMesh_7",
  85.       "CTownHouseMesh_8",
  86.       "CTownHouseMesh_9"
  87.     );
  88.  
  89.   void CBaseTownHouse()
  90.   {
  91.     int MeshNumber = rand_int(m_MeshClassNames.size());
  92.     InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
  93.     CUnitWithStateControl("CTownHouseStateControl");
  94.   }
  95. }
  96.  
  97. // Single game object
  98. class CMountedTownHouse extends CBaseTownHouse
  99. {
  100.   void CMountedTownHouse()
  101.   {
  102.     InitializeGroundControl();
  103.   }
  104. }
  105.  
  106.